﻿/*===========================================================================================
 * 
 *  Author          : Arturo Salvamante
 * 
 *  File            : PCSCException.cs
 * 
 *  Copyright (C)   : Advanced Card System Ltd
 * 
 *  Description     : Continas Methods and Properties for for PCSC exceptions
 * 
 *  Date            : June 03, 2011
 * 
 *  Revision Traile : [Author] / [Date if modification] / [Details of Modifications done]
 * 
 * 
 * =========================================================================================*/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ACS
{
    public class PcscException : System.Exception
    {
        private int _ErrCode;
        public int errCode
        {
            get { return _ErrCode; }
        }

        private string _message;
        public override string Message
        {
            get { return _message; }
        }

        public PcscException(int errCode)
        { 
            _ErrCode = errCode;
            _message = PCSCProvider.GetScardErrMsg(errCode);            
        }

        public PcscException(string message)
        {
            _message = message;
        }
    }
}
